#include <iostream>
#include <vector>
#include <list>

using std::list;
using std::vector;
using std::cout;
using std::endl;

template <typename Container>
void display(Container & con)
{
    for(auto &ele: con){
        cout << ele << " ";
    }
    cout << endl;
    cout << endl;
}

template <typename Container>
void mysize(Container & con)
{
    cout << "size() = " << con.size() << endl;
    /* cout << "capacity() = " << con.capacity() << endl; */
    cout << endl;
}
void test(){

    list<int> number = {1,2,8,5,2,0};
    display(number);

    number.push_back(1314);
    number.push_front(2004);
    display(number);

    number.pop_back();
    number.pop_front();
    display(number);
    
    auto it = number.begin();
    ++it;

    number.insert(it,66);
    display(number);

    number.insert(it,6,8);
    display(number);

    vector<int> vec = {1,3,5,7,9};
    number.insert(it,vec.begin(),vec.end());
    display(number);

    it = number.begin();
    number.insert(it,{11,22,33,44,55,66,77,88,99});
    display(number);
}

int main()
{
    test();
    return 0;
}

